package com.baizhi.feign;

import com.baizhi.dto.VideoFeedDTO;
import com.baizhi.po.OneUserPO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("USERS")
public interface UserFeign {
    @GetMapping("user/queryByUid/{uid}")
    String queryByUid(@PathVariable("uid") Integer uid);

    @GetMapping("user/queryById/{id}")
    OneUserPO queryOneById(@PathVariable("id") Integer id);

    @PostMapping("/user/feeds/video")
    void videoFeed(VideoFeedDTO videoFeed);

    @PostMapping("/user/played/insert")
    void addPlayed(@RequestParam("uid") Integer uid, @RequestParam("videoId") Integer videoId);
}
